// 懒加载组件
function lazy(name) { // menu1_item1
  let file = name.split('_')[0]  // ['menu1', 'item1']
  if (name !== 'dashboard') {
    return () => import(`@/page/${file}/${name}.vue`)
  } else {
    return () => import(`@/components/${name}.vue`)
  }
}
export {lazy}

